def solve(s):
    temp = ""
    for c in s:
        if c.isalnum():
            temp += c
    s = temp.lower()
    comp = ""
    for c in range(len(s) - 1, -1, -1):
        comp += s[c]

    if s == comp:
        return True
    else:
        return False


if __name__ == "__main__":
    s = "race a car"
    print(solve(s))
